/*
 * p1099.cpp
 *
 *  Created on: 2013-10-4
 *      Author: zy
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
const int maxn = 16;
const int maxw = 110;
int n, A[maxn], sum[1 << maxn], f[1 << maxn][maxw], vis[1 << maxn][maxw];

/* bitcount:  count 1 bits in x */
int bitcount(unsigned x)
{
	int b;
	for (b = 0; x != 0; x &= (x - 1))
		b++;
	return b;
}

int dp(int S, int x)
{
	if (vis[S][x])
		return f[S][x];
	vis[S][x] = 1;
	int& ans = f[S][x];
	if (bitcount(S) == 1)
		return ans = 1;
	int y = sum[S] / x;
	for (int S0 = (S - 1) & S; S0; S0 = (S0 - 1) & S)
	{
		int S1 = S ^ S0;
		if (sum[S0] % x == 0 && dp(S0, min(x, sum[S0] / x)) && dp(S1, min(x,
				sum[S1] / x)))
			return ans = 1;
		if (sum[S0] % y == 0 && dp(S0, min(y, sum[S0] / y)) && dp(S1, min(y,
				sum[S1] / y)))
			return ans = 1;
	}
	return ans = 0;
}

int main()
{
	int cas = 0, n, x, y;
	while (scanf("%d", &n) && n)
	{
		scanf("%d%d", &x, &y);
		for (int i = 0; i < n; i++)
			scanf("%d", &A[i]);

		//每个子集中的元素和
		memset(sum, 0, sizeof(sum));
		for (int S = 0; S < (1 << n); S++)
			for (int i = 0; i < n; i++)
				if (S & (1 << i))
					sum[S] += A[i];
		memset(vis, 0, sizeof(vis));
		int ALL = (1 << n) - 1;
		int ans;
		if (sum[ALL] != x * y)
			ans = 0;
		else
			ans = dp(ALL, min(x, y));
		printf("Case %d: %s\n", ++cas, ans ? "Yes" : "No");
	}
	return 0;
}
